package com.lighting.shortlink.project.common.convention.exception;

import com.lighting.shortlink.project.common.convention.errorcode.BaseErrorCode;
import com.lighting.shortlink.project.common.convention.errorcode.IErrorCode;

/**
 * 客户端异常
 * @author : lighting
 */
public class ServiceException extends AbstractException{
    public ServiceException(String message) {
        this(message,null, BaseErrorCode.SERVICE_ERROR);
    }

    public ServiceException(String message,IErrorCode errorCode)
    {
        this(message,null,errorCode);
    }

    protected ServiceException(String message, Throwable throwable, IErrorCode errorCode) {
        super(message, throwable, errorCode);
    }

    @Override
    public String toString() {
        return "ServiceException{" +
                "errorCode='" + errorCode + '\'' +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
